class: center, middle, inverse, title-slide # Lecture 24 ## MLR with Categorical Variables: Interactions ### Psych 10 C ### University of California, Irvine ### 05/27/2022 --- ## Model comparison: Simple linear regression models - Last class we looked at the predictions of each of the following models: -- - Null: `$$\text{Correct}_i \sim \text{Normal}(\beta_0, \sigma_1^2)$$` -- - Age: `$$\text{Correct}_i \sim \text{Normal}(\beta_0+\beta_1\text{age-group}_i, \sigma_2^2)$$` -- - Time: `$$\text{Correct}_i \sim \text{Normal}(\beta_0+\beta_2\text{time}_i, \sigma_3^2)$$` --- ## Model Comparison: Multiple linear regression models - Age and Time additive: `$$\text{Correct}_i \sim \text{Normal}(\beta_0+\beta_1\text{age-group}_i+\beta_2\text{time}_i, \sigma_4^2)$$` -- - Age and Time interaction: `$$\text{Correct}_i \sim \text{Normal}(\beta_0+\beta_1\text{age-group}_i+\beta_2\text{time}_i+\beta_3\text{age-group}_i\text{time}_i, \sigma_5^2)$$` -- <br> - We calculated the Sum of Squared Error of each model and with that the Mean squared error and BIC of each model so that now we can select the one that better accounts for our data. --- ## Model comparison | Model | Parameters | Mean SE | `\(R^2\)` | BIC | |-------------------|:----------:|:---------------------:|:--------------------:|:---------------------:| | Null | 1 | 68.5 | NA | 427.3 | | Time | 2 | 59.6 | 0.1 | 418 | | Age | 2 | 49 | 0.3 | 398.5 | | Age `\(+\)` Time | 3 | 41.4 | 0.4 | 386.2 | | Age `\(\times\)` Time | 4 | 36.7 | 0.5 | 378.6 | -- - Comparing the models using BIC, the one that accounts for the data better is the interaction model. -- - We can use this result and interpret the parameters of the model. --- ## Parameter interpretation - We will start with `\(\beta_0\)`: According to the model, the average number of correctly recognized words is approximately 90.1, for participants that belong to the **young** group. -- - For the parameter associated with the age group we can write: - According to the interaction model, the expected number of correctly recognized words for participants in the **elderly** group in comparison to the **young** group, when the time between study and test is set to 0 minutes, was 13.8. -- - Notice that we interpret the value in terms of the difference between groups. -- - Another important thing to realize is that the estimated value doesn't make sense, because it means that we would expect elderly participants to correctly recognize 104 out of 100 words (where do the other 4 words come from?). -- - Like we said at the end of last class this is because the assumption that we made at the start (responses follow a Normal distribution) is wrong. --- ## Parameter interpretation - The interpretation for the parameter associated with the elapsed time between study and test `\(\beta_2\)` can be interpreted as: -- - The change associated with the elapsed time between study and test phase was equal to -0.14, this means that the average number of correctly recognized words decreases by approximately 0.14 words by minute in the young population. -- - The interpretation of the interaction parameter (the one associated with the product between age group and time elapsed) is: -- - The difference in the effect of time elapsed between study and test phase between the young and elderly population was -0.76, this indicates that the average number of words decreases by 0.76 more words on average in the elderly population in comparison to the young population. -- - In other words, participants in the elderly population are expected to forget 0.9 words a minute on average, in comparison to 0.14 in the young population --- ## Conclusion - With the results from our model comparison now we are able to reach a conclusion about our original research question. -- - The model that best accounts for our observations in the experiment was the interaction model between the age group that a participant belongs to and the time elapsed between the study and test phase of the experiment. -- - According to our results, the estimated value of the intercept for each group, suggests that elderly participants are expected to correctly recognize more words when there is no time interval between the end of the study phase and test, in comparison to participants in the young population. -- - However, there is a difference in the average number of words that each group will forget for each additional minute between study and test. The results indicate that elderly participants will forget, on average, 0.9 words per minute, in comparison to only 0.14 on average for the young population. -- - In summary, elderly participants seem to lose the ability to recognize previously studied words at a faster rate than young participants.